<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:a="http://topnet.it/facelets"
	xmlns:fn="http://topnet.it/functions"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich"
	xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">

THIS TEXT WILL BE REMOVED
<ui:composition>
	<c:if test="${empty type}">
		<c:set var="type" value="inputText" />
	</c:if>
	<c:if test='${type == "flower"}'>
		<h:outputText value="&#60;div style='clear:both;' &#62;"
			escape="false" />
	</c:if>
	<c:if test="${empty rendered}">
		<c:set var="rendered" value="true" />
	</c:if>
	<c:if test="${empty required}">
		<c:set var="required" value="true" />
	</c:if>
	<c:if test="${empty size}">
		<c:set var="size" value="35" />
	</c:if>
	<c:if test="${empty maxlength}">
		<c:set var="maxlength" value="120" />
	</c:if>
	<c:if test="${empty val}">
		<c:set var="val" value="" />
	</c:if>
	<c:if test="${empty id}">
		<c:set var="id" value="#{fieldName}id" />
	</c:if>
	<c:if test="${empty label}">
		<c:set var="label" value="${id}Label" />
	</c:if>
	<c:if test="${empty readonly}">
		<c:set var="readonly" value="false" />
	</c:if>
	<c:if test="${empty msgView}">
		<c:set var="msgView" value="true" />
	</c:if>
	<c:if test="${empty styleClass}">
		<c:set var="styleClass" value="" />
	</c:if>
	<c:choose>
		<c:when test='${rendered == "true"}'>
			<c:choose>
				<c:when test='${type == "inputText"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<c:choose>
						<c:when test="${empty validator}">
							<h:inputText id="#{id}" value="#{entity[fieldName]}"
								readonly="#{readonly}" required="${required}" size="#{size}"
								maxlength="#{maxlength}">
								<ui:insert />
							</h:inputText>
						</c:when>
						<c:otherwise>
							<h:inputText id="#{id}" value="#{entity[fieldName]}"
								readonly="#{readonly}" required="${required}" size="#{size}"
								maxlength="#{maxlength}" validator="#{validator[validatorM]}" />
						</c:otherwise>
					</c:choose>
				</c:when>
				<c:when test='${type == "hidden"}'>
					<h:inputHidden id="#{id}" value="#{entity[fieldName]}" />
				</c:when>
				<c:when test='${type == "password"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<h:inputSecret id="#{id}" value="#{entity[fieldName]}"
						required="${required}" size="#{size}" maxlength="#{maxlength}">
						<ui:insert />
					</h:inputSecret>
				</c:when>
				<c:when test='${type == "radio"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<h:selectOneRadio id="#{id}" value="#{entityId[fieldName]}"
						readonly="#{readonly}" styleClass="#{styleClass}">
						<f:selectItems value="#{entityList[fieldNameList]}" />
					</h:selectOneRadio>
				</c:when>
				<c:when test='${type == "inputTextArea"}'>
					<c:if test="${empty rows}">
						<c:set var="rows" value="3" />
					</c:if>
					<c:if test="${empty cols}">
						<c:set var="cols" value="40" />
					</c:if>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<h:inputTextarea id="#{id}" value="#{entity[fieldName]}"
						rows="#{rows}" cols="#{cols}" required="${required}"
						readonly="#{readonly}" escape="false" />
				</c:when>
				<c:when test='${type == "link"}'>
					<h:outputLink value="${val}">
						<h:outputText value="${label}" />
					</h:outputLink>
					<h:inputText id="#{id}" value="#{entity[fieldName]}"
						required="${required}" size="#{size}" />
				</c:when>
				<c:when test='${type == "linkPopup"}'>
					<h:outputLabel id="${id}Label" value="${label1}" for="#{id}" />
					<h:inputText id="#{id}" value="#{entity[fieldName]}"
						required="${required}" size="#{size}" />
					<h:outputLink value="${val}">
						<h:outputText value="${label2}" />
					</h:outputLink>
				</c:when>
				<c:when test='${type == "calendar"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<rich:calendar value="#{entity[fieldName]}" id="#{id}" popup="true"
						datePattern="d/M/yyyy" enableManualInput="true"
						showApplyButton="false" style="width:200px"
						converterMessage="Data non valida!"
						requiredMessage="Campo obbligatorio!" />
				</c:when>
				<c:when test='${type == "dateTime"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<rich:calendar value="#{entity[fieldName]}" id="#{id}"
						style="width:200px" popup="true" showInput="true"
						enableManualInput="true" datePattern="d/M/yy HH:mm"
						showApplyButton="false" converterMessage="Data non valida!"
						requiredMessage="Campo obbligatorio!" />
				</c:when>
				<c:when test='${type == "checkbox"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<h:selectBooleanCheckbox id="#{id}" title="${label}"
						value="#{entity[fieldName]}" readonly="#{readonly}" />
				</c:when>
				<c:when test='${type == "hhmm"}'>
					<h:outputLabel id="${id}Label" value="${label}" for="#{id}" />
					<h:inputText id="#{id}" value="#{entity[fieldName]}" size="4"
						maxlength="4" readonly="#{readonly}" />
					<h:inputText id="#{fieldName1}" value="#{entity[fieldName1]}"
						size="4" maxlength="4" readonly="#{readonly}" />
				</c:when>
				<c:when test='${type == "selOneM"}'>
					<h:outputLabel value="${label}" for="${id}" />
					<h:selectOneMenu id="${id}" value="#{entityId[fieldName]}"
						readonly="#{readonly}">
						<f:selectItems value="#{entityList[fieldNameList]}" />
					</h:selectOneMenu>
				</c:when>
				<c:when test='${type == "selOneM_items"}'>
					<h:outputLabel value="${label}" for="${id}" />
					<h:selectOneMenu id="${id}" value="#{entityId[fieldName]}"
						readonly="#{readonly}">
						<f:selectItems value="#{fieldNameList}" />
					</h:selectOneMenu>
				</c:when>
				<c:when test='${type == "selOneM_Aitems"}'>
					<h:panelGroup>
						<h:outputLabel value="${label}" for="${id}" />
					</h:panelGroup>
					<h:panelGroup>
						<h:selectOneMenu id="${id}" value="#{entityId[fieldName]}"
							readonly="#{readonly}">
							<f:selectItems value="#{fieldNameList}" />
							<a4j:support event="onchange" reRender="#{reRender}" />
						</h:selectOneMenu>
					</h:panelGroup>
				</c:when>
				<c:when test='${type == "selOneAjax"}'>
					<h:outputLabel value="${label}" for="${id}" />
					<h:selectOneMenu id="${id}" value="#{entityId[fieldName]}"
						readonly="#{readonly}">
						<f:selectItems value="#{fieldNameList}" />
						<a4j:support event="onchange" reRender="#{reRender}" />
					</h:selectOneMenu>
				</c:when>

			</c:choose>
		</c:when>
	</c:choose>
	<c:choose>
		<c:when test="${rendered == 'true' and msgView == 'true'}">
			<h:outputText value="&#32;" escape="false" />
			<h:message id="${id}Message" style="color: #0094D6;" for="#{id}" />
		</c:when>
	</c:choose>
	<c:if test='${type == "flower"}'>
		<h:outputText value="&#60;/div&#62;" escape="false" />
	</c:if>
</ui:composition>
THIS TEXT WILL BE REMOVED AS WELL

</html>
